#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
#include<string.h>
int main()
{
	char arr[] = "zhou@chen.xi";
	char buf[256] = {0};
	strcpy(buf, arr);
	char* sep = "@.";

	char* ret = strtok(buf, sep);
	printf("%s\n", ret);
	ret = strtok(NULL, sep);
	printf("%s\n", ret);
	ret = strtok(NULL, sep);
    printf("%s\n", ret);
	return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	char arr[] = "zhou@chen.xi";
	char buf[256] = { 0 };
	strcpy(buf, arr);//"zhou\0chen\0xi"
	char* sep = "@.";
	char* ret = NULL;
	for (ret = strtok(buf, sep); ret != NULL; ret = strtok(NULL, sep))
	{
		printf("%s\n", ret);
	}
	/*char* ret = strtok(buf, sep);
	printf("%s\n", ret);
	ret = strtok(NULL, sep);
	printf("%s\n", ret);
	ret = strtok(NULL, sep);
	printf("%s\n", ret);*/
	return 0;
}